﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;

namespace QuickFramework.UICore.Controllers.Books
{
    /// <summary>
    /// 图书语言相关
    /// </summary>
    [Area("Books")]
    public class BookLanguageController : Shared.Contracts.AuthorizeControllerBase
    {
        BookStores.IDomain.IBookLanguage m_IBookLanguage;
        /// <summary>
        /// 
        /// </summary>
        /// <param name="bookLanguage"></param>
        public BookLanguageController(BookStores.IDomain.IBookLanguage bookLanguage)
        {
            m_IBookLanguage = bookLanguage;
        }
        /// <summary>
        /// 获取所有书籍语种
        /// url: /api/Books/BookLanguage/GetBookLanguage
        /// </summary>
        /// <returns></returns>
        [HttpGet]
        public async Task<IActionResult> GetBookLanguage()
        {
            return Ok(await m_IBookLanguage.GetAllList());        
        }
    }
}
